.TH std::experimental::basic_string_view::operator= 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::experimental::basic_string_view::operator= \- std::experimental::basic_string_view::operator=

.SH Synopsis
   basic_string_view& operator=( const basic_string_view&     (library fundamentals TS)
   view ) noexcept = default;

   Replaces the view with that of view.

.SH Parameters

   view - view to copy

.SH Return value

   *this

.SH Complexity

   Constant.

.SH Example


// Run this code

 #include <iostream>
 #include <experimental/string_view>
 int main()
 {
     std::experimental::string_view v = "Hello, world";
     v = v.substr(7);
     std::cout << v << '\\n';
 }

.SH Output:

 world

.SH See also

   constructor   constructs a basic_string_view
                 \fI(public member function)\fP

.SH Category:
     * Noindexed pages
